package impl.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.apache.commons.logging.*;
import org.apache.commons.logging.Log;


/**
 * @author futao
 * Created on 18-2-5-上午10:41.
 */

public class HelloController implements Controller {
    private static final Log logger = LogFactory.getLog(HelloController.class);

    public ModelAndView handleRequest(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws Exception {
        logger.info("hello被调用了");
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("message", "Hello World");
//        modelAndView.setViewName("/WEB-INF/content/welcome.jsp");
        return modelAndView;
    }
}
